//
//  NSString+toDate.m
//  WXMedia
//
//  Created by User on 14-6-11.
//  Copyright (c) 2014年 User. All rights reserved.
//

#import "NSString+toDate.h"

@implementation NSString (toDate)

- (NSDate *)stringWithNOTimeDate
{
	NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
	[dateFormatter setDateFormat:@"yyyy-MM-dd"];
	NSDate *date = [dateFormatter dateFromString:self];
	
	return date;
}

- (NSDate *)stringWithYESTimeDate
{
	NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
	[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
	NSDate *date = [dateFormatter dateFromString:self];
	
	return date;
}

@end
